package com.kgc.scd.service;
import com.kgc.scd.bean.Comment;
import com.kgc.scd.form.CommentForm;
import com.kgc.scd.form.ReviewForm;
import com.kgc.scd.util.PageSupport;
import com.kgc.scd.util.RequestResult;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * Created On : 2022/11/17.
 * <p>
 * Author : Administrator
 * <p>
 * Description: WebCommentService
 */
@FeignClient(value = "wyyxmall-jgq-server")
public interface WebCommentService {
    /**
     * @author : Administrator
     * @date   : 2022/11/15
     * @param  : [comment, pageNo, pageSize]
     * @return : com.kgc.scd.util.RequestResult<?>
     * @description : 查询评论列表
     */
    @GetMapping("/getCommentList")
    PageSupport<Comment> getCommentList(@RequestParam("goodsId") String goodsId, @RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize);


    /**
     * @author : Administrator
     * @date   : 2022/11/18
     * @param  : []
     * @return : com.kgc.scd.util.RequestResult<?>
     * @description : 增加评论
     */
    @PostMapping("/addCommentList")
    RequestResult<?> addCommentList(@RequestBody CommentForm commentForm);

    /**
     * @author : Administrator
     * @date   : 2022/11/18
     * @param  : []
     * @return : com.kgc.scd.util.RequestResult<?>
     * @description : 追加评论
     */
    @PostMapping("/updateReviewList")
    RequestResult<?> addReviewList(@RequestBody ReviewForm reviewForm);
}
